import request from '@/utils/request'

// 查询公寓房间信息列表
export function listRoomInfo(query) {
  return request({
    url: '/business/roomInfo/list',
    method: 'get',
    params: query
  })
}

export function getRoomInfoList() {
  return request({
    url: '/business/roomInfo/getRoomInfoList',
    method: 'get'
  })
}

// 查询公寓房间信息详细
export function getRoomInfo(query){
  return request({
    url: '/business/roomInfo/getRoomInfoById',
    method: 'get',
    params:query,
  })
}

// 新增公寓房间信息
export function addRoomInfo(data) {
  return request({
    url: '/business/roomInfo',
    method: 'post',
    data: data
  })
}

// 修改公寓房间信息
export function updateRoomInfo(data) {
  return request({
    url: '/business/roomInfo',
    method: 'put',
    data: data
  })
}

// 删除公寓房间信息
export function delRoomInfo(id) {
  return request({
    url: '/business/roomInfo/' + id,
    method: 'delete'
  })
}
//获取房间 内的信息 包括 住户
export function getRoomAllInfo(query) {
  return request({
    url: '/business/roomInfo/roomBedInfo',
    method: 'post',
    params: query
  })
}

//
export function getDictInfo() {
  return request({
    url: '/apartment.dict.get',
    method: 'post',
  })
}

// 查询公寓房间当前的价格
export function getRoomPrice(query) {
  return request({
    url: '/business/roomInfo/roomPriceInfo',
    method: 'post',
    params: query
  })
}

export function updateRoomPrice(query) {
  return request({
    url: '/business/roomInfo/updateRoomPrice',
    method: 'post',
    params: query
  })
}

export function addRoomPrice(query) {
  return request({
    url: '/business/roomInfo/addRoomPrice',
    method: 'post',
    params: query
  })
}
export function getNurseRoomInfo() {
  return request({
    url: '/business/roomInfo/nurseRoom',
    method: 'post',
  })
}
